package com.sky.mapper.user;

import com.sky.pojo.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface OrderDetailMapper {
    void batchSave(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单明细
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);

    List<OrderDetail> selectByTradeNo(Long tradeNo);

    List<Map<String, Object>> selectTop10ByDate(String start, String end);
}
